import request from '../../utils/request'
import type {SearchData,KeyWordList} from './model/search'

export const reqSearchData=()=>{
    return request.get<any,SearchData>(`/xhr/search/init.json`)
    // console.log('123123',res)
}
export const reqNowKeyWords=(data:any)=>{
    return request.post("/xhr/search/searchAutoComplete.json",data)
}

export const reqRealWord=(realkeyWords:string)=>{
    return request.post<any,KeyWordList>(`/xhr/search/search.json?__timestamp=1630133434953&needPopWindow=true&searchWordSource=
    7&stillSearch=false&_stat_search=autoComplete&itemId=0&size=40&upperPrice=-1&floorPrice=
    -1&matchType=0&categoryId=0&descSorted=false&sortType=0&keyword=${realkeyWords}`)
}